home *** CD-ROM | disk | FTP | other *** search
/ MacTech 1 to 12 / MacTech-vol-1-12.toast / Tools / Mac F2C 1.3.3 / Test Project ƒ / MPW_Support / test.PPC.CW.make < prev    next >
Text File  |  1996-02-25  |  2KB  |  75 lines

  1. #   File:       test.PPC.CW.make
  2. #   Target:     test
  3. #   Sources:    test.c
  4.  
  5. Makefile = :MPW_Support:test.PPC.CW.make
  6.  
  7. object_folder = ":MPW_Support:objects_PPC:"
  8.  
  9. fsource =    test.f 
  10.             
  11. csource =    F2Cmain.c
  12.  
  13. fobjs     =    {object_folder}'test.f.o'
  14.             
  15. cobjs    =    {object_folder}'F2Cmain.c.o'
  16.  
  17.  
  18. objects =    {fobjs} ∂
  19.             {cobjs}
  20.  
  21. PPCC            =    MWCPPC
  22. PPCCOptions        =    -align power -nosyspath -i "{CIncludes}" -d MPW_CW_F2C -w off
  23.  
  24. F2C                =    F2C
  25. F2COptions        =    -f -!i8 -A -E -ec -a -!R -r8 -w66
  26.  
  27. PPCLink            =    MWLinkPPC
  28. PPCLinkOptions    =    -d -xm m
  29.  
  30. test.PPC.CW ƒ {objects} {Makefile}
  31.     {PPCLink} {PPCLinkOptions} ∂
  32.         {OBJECTS} ∂
  33.         "{SharedLibraries}"InterfaceLib ∂
  34.         "{MWPPCLibraries}"MWStdCRuntime.Lib ∂
  35.         "{SharedLibraries}"StdCLib ∂
  36.         "{SharedLibraries}"MathLib ∂
  37.         "{MWPPCLibraries}PPCToolLibs.o" ∂
  38.         "{F2CLibraries}"libI77.PPC   ∂
  39.         "{F2CLibraries}"libF77.PPC   ∂
  40.         -o test.PPC.CW
  41.  
  42. .f.o    ƒ    .f
  43.     {F2C} {F2COptions} {Default}.f    #compile the fortran and then compile the resulting C file.
  44.     setfile -t "TEXT" -c "MPS " {default}.c
  45.     {PPCC} {default}.c {PPCCOptions} ∂
  46.     -o {targDir}{default}.f.o
  47.  
  48.  
  49. .c.o ƒ .c
  50.     {PPCC} {default}.c {PPCCOptions} ∂
  51.     -o {targDir}{default}.c.o
  52.  
  53.  
  54. # If your FORTRAN code has common blocks add common.c.o to the cobjs list 
  55. # and then this rule should take care of it
  56. common.c    ƒ    {fobjs}
  57.     setfile -t "TEXT" -c "MPS " ?+_com.c
  58.     catenate ?+_com.c > {targDir}{Targ}    #This puts all the common block files into one file for compiling.
  59.                                         #The wild card lets us add common blocks to the fortran code
  60.                                         #without having to change the makefile!  The common block files all
  61.                                         #end with _com.c
  62.  
  63. {objects}    ƒ    {Makefile}        #do a full rebuild if the makefile changes
  64.  
  65. {object_folder}    ƒ :
  66.  
  67. {object_folder}'test.f.o'  ƒ 'test.f'
  68.  
  69. {object_folder}'F2Cmain.c.o'    ƒ 'F2Cmain.c'
  70.  
  71. {object_folder}'common.c.o'    ƒ 'common.c'
  72.  
  73. # makefile end
  74.  
  75.